<include file="Public/header" />
<link rel="stylesheet" type="text/css" href="__PUBLIC__/app/assets/css/swiper.min.css">
<link rel="stylesheet" type="text/css" href="__PUBLIC__/mui/css/mui.min.css" >
<script type="text/javascript" src="__PUBLIC__/mui/js/mui.min.js"></script>
</head>
<body>
    <div class="page-group">
        <div class="page page-current">
            <div class="content page-inited">
                <div class="swiper-container" id="index-banner">
                    <div class="swiper-wrapper" id="banner">
                    <volist name="flash" id="val">
                        <div class="swiper-slide">
                            <a href="javascript:;">
                                <img src="{$val['pic']}"></a>
                        </div>
                        </volist>
                    </div>
                    <div class="swiper-pagination"></div>
                </div>
                <div class="nav-list">
                    <ul class="list-li">
                        <!--<li>
                            <a href="{:U('Appointment/index')}">
                                <i class="icon icon-dache"></i>
                                <p>预约学车</p>
                            </a>
                        </li>-->
                        <li>
                            <a href="{:U('SchoolList/index',array('status'=>2))}">
                                <i class="icon icon-sousuo"></i>
                                <p>查驾校</p>
                            </a>
                        </li>
                        <!--<li>
                            <a href="{:U('SchoolList/index',array('status'=>1))}">
                                <i class="icon icon-card"></i>
                                <p>找教练</p>
                            </a>
                        </li>-->
                        <li>
                            <a href="{:U('MeetingCarRecord/index')}">
                                <i class="icon icon-clock"></i>
                                <p>约车记录</p>
                            </a>
                        </li>
                        <!--<li>
                            <a href="{:U('User/index')}">
                                <i class="icon icon-friends"></i>
                                <p>会员中心</p>
                            </a>
                        </li>-->
                        <li style="background: #8d44ad;">
                            <a href="{:U('Help/index')}">
                                <i class="icon icon-help"></i>
                                <p>帮助</p>
                            </a>
                        </li>
                    </ul>
                </div>
                <div class="ds-title">推荐列表</div>
                 <div class="list-block media-list ds-list" id="MemberInfo" >
                    <div id="refreshContainer" class="mui-scroll-wrapper" style="top:64%;">
                        <div class="mui-scroll">
                            <!--列表一定要放到容器内,因为会有一个div append到mui-scroll中,需要在底部才能起作用-->
                            <input type="hidden" name="num" id="num" value="{$num}">
                            <ul></ul>
                        </div>
                    </div>
                </div>
<!--                <div id="more" class="more" ><p>加载更多</p></div>-->
                
<!--  <div id="jiazai" style="display: none;text-align: center;"><img width="20px" height="20px;" src="__PUBLIC__/app/assets/images/time.gif"></div>-->
            </div>
        </div>
    </div>
    <script src="__PUBLIC__/app/lib/swiper.min.js" type="text/javascript" charset="utf-8"></script>
    <script type="text/javascript">var mySwiper = new Swiper(".swiper-container", {
            autoplay: 1e3,
            pagination: ".swiper-pagination",
            loop: !0,
            autoplayDisableOnInteraction: !1
        })</script>
    <script type="text/javascript">
        var p=1;
        var num=$('#num').val();
        mui.init({
            pullRefresh : {
              container:"#refreshContainer",//待刷新区域标识，querySelector能定位的css选择器均可，比如：id、.class等
              up : {
                height:50,//可选.默认50.触发上拉加载拖动距离
                auto:true,//可选,默认false.自动上拉加载一次
                contentrefresh : "正在加载...",//可选，正在加载状态时，上拉加载控件上显示的标题内容
                contentnomore:'没有更多数据了',//可选，请求完毕若没有更多数据时显示的提醒内容；
                callback :function() {
                    getMore(p);
                    p++;
                    mui('#refreshContainer').pullRefresh().endPullupToRefresh(false);
                    
                } //必选，刷新函数，根据具体业务来编写，比如通过ajax从服务器获取新数据；
              }
            }
         });

        function getMore(p){
            $.ajax({
                url:"{:U('Index/info')}",
                data:{p:p},
                type:'post',
                success:function(data){
                    $("#refreshContainer ul").append(data);
                    mui('#refreshContainer').pullRefresh().enablePullupToRefresh();
//                     mui('#refreshContainer').endPullupToRefresh(false);//结束下拉刷新
                }
            });

        }
    </script>
</body>
<include file="Public/footer" />